﻿using SharpDX;
using System.Windows.Forms;
using ProtoBuf;

namespace Engine
{
    /// <summary>
    /// Класс источника света
    /// </summary>
    [ProtoContract]
    [ProtoInclude(100, typeof(EELightShadow))]
    public class EELight
    {
        /// <summary>
        /// Позиция источника света
        /// </summary>
        [ProtoMember(1)]
        public DVector3 Position = new DVector3();

        public virtual bool Shadow() { return false; }

        /// <summary>
        /// Цвет источника света
        /// </summary>
        [ProtoMember(2)]
        public Vector3 Color = new Vector3(1f,1f,1f);

        /// <summary>
        /// Дальность освещения
        /// </summary>
        [ProtoMember(3)]
        public float Distance = 100f;

        [ProtoMember(4)]
        public float Life = 0f;

        [ProtoMember(5)]
        public float MaxLife = 1000f;

        [ProtoMember(6)]
        public float Statte = 0;

        public EELight(DVector3 Position, Vector3 Color, float Distance, float MaxLife)
        {
            this.Position = Position;
            this.Color = Color;
            this.Distance = Distance;
            this.MaxLife = MaxLife;
        }

        /// <summary>
        /// Конструктор
        /// </summary>
        public EELight()
        {
        }
    }
}
